<.focus_box>
  <:title>Enter password</:title>
  <:subtitle>
    This link is password-protected. Please enter the password to continue to the dashboard.
  </:subtitle>
  <.form :let={f} for={@conn} action={"/share/#{@link.slug}/authenticate"}>
    <div class="my-6">
      <.input type="password" field={f[:password]} />

      <%= if @conn.assigns[:error] do %>
        <div class="text-red-500 text-xs italic mt-4">{@conn.assigns[:error]}</div>
      <% end %>
    </div>

    <.button type="submit" class="w-full">
      Continue
    </.button>
  </.form>
</.focus_box>
